// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Elastic.Clients.Elasticsearch.SearchApplication;

public partial class SearchApplicationNamespacedClient : NamespacedClientProxy
{
	/// <summary>
	/// <para>Initializes a new instance of the <see cref="SearchApplicationNamespacedClient"/> class for mocking.</para>
	/// </summary>
	protected SearchApplicationNamespacedClient() : base()
	{
	}

	internal SearchApplicationNamespacedClient(ElasticsearchClient client) : base(client)
	{
	}

	/// <summary>
	/// <para>Deletes a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual DeleteSearchApplicationResponse Delete(DeleteSearchApplicationRequest request)
	{
		request.BeforeRequest();
		return DoRequest<DeleteSearchApplicationRequest, DeleteSearchApplicationResponse, DeleteSearchApplicationRequestParameters>(request);
	}

	/// <summary>
	/// <para>Deletes a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteSearchApplicationResponse> DeleteAsync(DeleteSearchApplicationRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteSearchApplicationRequest, DeleteSearchApplicationResponse, DeleteSearchApplicationRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual DeleteSearchApplicationResponse Delete(DeleteSearchApplicationRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<DeleteSearchApplicationRequestDescriptor, DeleteSearchApplicationResponse, DeleteSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Deletes a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual DeleteSearchApplicationResponse Delete(Elastic.Clients.Elasticsearch.Name name)
	{
		var descriptor = new DeleteSearchApplicationRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequest<DeleteSearchApplicationRequestDescriptor, DeleteSearchApplicationResponse, DeleteSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Deletes a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual DeleteSearchApplicationResponse Delete(Elastic.Clients.Elasticsearch.Name name, Action<DeleteSearchApplicationRequestDescriptor> configureRequest)
	{
		var descriptor = new DeleteSearchApplicationRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<DeleteSearchApplicationRequestDescriptor, DeleteSearchApplicationResponse, DeleteSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Deletes a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteSearchApplicationResponse> DeleteAsync(DeleteSearchApplicationRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteSearchApplicationRequestDescriptor, DeleteSearchApplicationResponse, DeleteSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteSearchApplicationResponse> DeleteAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteSearchApplicationRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteSearchApplicationRequestDescriptor, DeleteSearchApplicationResponse, DeleteSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteSearchApplicationResponse> DeleteAsync(Elastic.Clients.Elasticsearch.Name name, Action<DeleteSearchApplicationRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteSearchApplicationRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteSearchApplicationRequestDescriptor, DeleteSearchApplicationResponse, DeleteSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Delete a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(DeleteBehavioralAnalyticsRequest request)
	{
		request.BeforeRequest();
		return DoRequest<DeleteBehavioralAnalyticsRequest, DeleteBehavioralAnalyticsResponse, DeleteBehavioralAnalyticsRequestParameters>(request);
	}

	/// <summary>
	/// <para>Delete a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteBehavioralAnalyticsResponse> DeleteBehavioralAnalyticsAsync(DeleteBehavioralAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteBehavioralAnalyticsRequest, DeleteBehavioralAnalyticsResponse, DeleteBehavioralAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Delete a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(DeleteBehavioralAnalyticsRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<DeleteBehavioralAnalyticsRequestDescriptor, DeleteBehavioralAnalyticsResponse, DeleteBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Delete a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(Elastic.Clients.Elasticsearch.Name name)
	{
		var descriptor = new DeleteBehavioralAnalyticsRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequest<DeleteBehavioralAnalyticsRequestDescriptor, DeleteBehavioralAnalyticsResponse, DeleteBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Delete a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(Elastic.Clients.Elasticsearch.Name name, Action<DeleteBehavioralAnalyticsRequestDescriptor> configureRequest)
	{
		var descriptor = new DeleteBehavioralAnalyticsRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<DeleteBehavioralAnalyticsRequestDescriptor, DeleteBehavioralAnalyticsResponse, DeleteBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Delete a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteBehavioralAnalyticsResponse> DeleteBehavioralAnalyticsAsync(DeleteBehavioralAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteBehavioralAnalyticsRequestDescriptor, DeleteBehavioralAnalyticsResponse, DeleteBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Delete a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteBehavioralAnalyticsResponse> DeleteBehavioralAnalyticsAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteBehavioralAnalyticsRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteBehavioralAnalyticsRequestDescriptor, DeleteBehavioralAnalyticsResponse, DeleteBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Delete a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteBehavioralAnalyticsResponse> DeleteBehavioralAnalyticsAsync(Elastic.Clients.Elasticsearch.Name name, Action<DeleteBehavioralAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteBehavioralAnalyticsRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteBehavioralAnalyticsRequestDescriptor, DeleteBehavioralAnalyticsResponse, DeleteBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the details about a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetSearchApplicationResponse Get(GetSearchApplicationRequest request)
	{
		request.BeforeRequest();
		return DoRequest<GetSearchApplicationRequest, GetSearchApplicationResponse, GetSearchApplicationRequestParameters>(request);
	}

	/// <summary>
	/// <para>Returns the details about a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetSearchApplicationResponse> GetAsync(GetSearchApplicationRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetSearchApplicationRequest, GetSearchApplicationResponse, GetSearchApplicationRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the details about a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetSearchApplicationResponse Get(GetSearchApplicationRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<GetSearchApplicationRequestDescriptor, GetSearchApplicationResponse, GetSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the details about a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetSearchApplicationResponse Get(Elastic.Clients.Elasticsearch.Name name)
	{
		var descriptor = new GetSearchApplicationRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequest<GetSearchApplicationRequestDescriptor, GetSearchApplicationResponse, GetSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the details about a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetSearchApplicationResponse Get(Elastic.Clients.Elasticsearch.Name name, Action<GetSearchApplicationRequestDescriptor> configureRequest)
	{
		var descriptor = new GetSearchApplicationRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<GetSearchApplicationRequestDescriptor, GetSearchApplicationResponse, GetSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the details about a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetSearchApplicationResponse> GetAsync(GetSearchApplicationRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetSearchApplicationRequestDescriptor, GetSearchApplicationResponse, GetSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the details about a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetSearchApplicationResponse> GetAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetSearchApplicationRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetSearchApplicationRequestDescriptor, GetSearchApplicationResponse, GetSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the details about a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetSearchApplicationResponse> GetAsync(Elastic.Clients.Elasticsearch.Name name, Action<GetSearchApplicationRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetSearchApplicationRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetSearchApplicationRequestDescriptor, GetSearchApplicationResponse, GetSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(GetBehavioralAnalyticsRequest request)
	{
		request.BeforeRequest();
		return DoRequest<GetBehavioralAnalyticsRequest, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(request);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBehavioralAnalyticsResponse> GetBehavioralAnalyticsAsync(GetBehavioralAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetBehavioralAnalyticsRequest, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(GetBehavioralAnalyticsRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(IReadOnlyCollection<Elastic.Clients.Elasticsearch.Name>? name)
	{
		var descriptor = new GetBehavioralAnalyticsRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequest<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(IReadOnlyCollection<Elastic.Clients.Elasticsearch.Name>? name, Action<GetBehavioralAnalyticsRequestDescriptor> configureRequest)
	{
		var descriptor = new GetBehavioralAnalyticsRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics()
	{
		var descriptor = new GetBehavioralAnalyticsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual GetBehavioralAnalyticsResponse GetBehavioralAnalytics(Action<GetBehavioralAnalyticsRequestDescriptor> configureRequest)
	{
		var descriptor = new GetBehavioralAnalyticsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBehavioralAnalyticsResponse> GetBehavioralAnalyticsAsync(GetBehavioralAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBehavioralAnalyticsResponse> GetBehavioralAnalyticsAsync(IReadOnlyCollection<Elastic.Clients.Elasticsearch.Name>? name, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBehavioralAnalyticsRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBehavioralAnalyticsResponse> GetBehavioralAnalyticsAsync(IReadOnlyCollection<Elastic.Clients.Elasticsearch.Name>? name, Action<GetBehavioralAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBehavioralAnalyticsRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBehavioralAnalyticsResponse> GetBehavioralAnalyticsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBehavioralAnalyticsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing behavioral analytics collections.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBehavioralAnalyticsResponse> GetBehavioralAnalyticsAsync(Action<GetBehavioralAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBehavioralAnalyticsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBehavioralAnalyticsRequestDescriptor, GetBehavioralAnalyticsResponse, GetBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing search applications.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ListResponse List(ListRequest request)
	{
		request.BeforeRequest();
		return DoRequest<ListRequest, ListResponse, ListRequestParameters>(request);
	}

	/// <summary>
	/// <para>Returns the existing search applications.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ListResponse> ListAsync(ListRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ListRequest, ListResponse, ListRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing search applications.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ListResponse List(ListRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<ListRequestDescriptor, ListResponse, ListRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the existing search applications.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ListResponse List()
	{
		var descriptor = new ListRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<ListRequestDescriptor, ListResponse, ListRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the existing search applications.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ListResponse List(Action<ListRequestDescriptor> configureRequest)
	{
		var descriptor = new ListRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ListRequestDescriptor, ListResponse, ListRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Returns the existing search applications.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ListResponse> ListAsync(ListRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ListRequestDescriptor, ListResponse, ListRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing search applications.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ListResponse> ListAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new ListRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<ListRequestDescriptor, ListResponse, ListRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns the existing search applications.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ListResponse> ListAsync(Action<ListRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ListRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ListRequestDescriptor, ListResponse, ListRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates or updates a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual PutSearchApplicationResponse Put(PutSearchApplicationRequest request)
	{
		request.BeforeRequest();
		return DoRequest<PutSearchApplicationRequest, PutSearchApplicationResponse, PutSearchApplicationRequestParameters>(request);
	}

	/// <summary>
	/// <para>Creates or updates a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutSearchApplicationResponse> PutAsync(PutSearchApplicationRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutSearchApplicationRequest, PutSearchApplicationResponse, PutSearchApplicationRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Creates or updates a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual PutSearchApplicationResponse Put(PutSearchApplicationRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<PutSearchApplicationRequestDescriptor, PutSearchApplicationResponse, PutSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Creates or updates a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name)
	{
		var descriptor = new PutSearchApplicationRequestDescriptor(searchApplication, name);
		descriptor.BeforeRequest();
		return DoRequest<PutSearchApplicationRequestDescriptor, PutSearchApplicationResponse, PutSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Creates or updates a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual PutSearchApplicationResponse Put(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name, Action<PutSearchApplicationRequestDescriptor> configureRequest)
	{
		var descriptor = new PutSearchApplicationRequestDescriptor(searchApplication, name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<PutSearchApplicationRequestDescriptor, PutSearchApplicationResponse, PutSearchApplicationRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Creates or updates a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutSearchApplicationResponse> PutAsync(PutSearchApplicationRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutSearchApplicationRequestDescriptor, PutSearchApplicationResponse, PutSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates or updates a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutSearchApplicationResponse> PutAsync(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutSearchApplicationRequestDescriptor(searchApplication, name);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutSearchApplicationRequestDescriptor, PutSearchApplicationResponse, PutSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates or updates a search application.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutSearchApplicationResponse> PutAsync(Elastic.Clients.Elasticsearch.SearchApplication.SearchApplication searchApplication, Elastic.Clients.Elasticsearch.Name name, Action<PutSearchApplicationRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutSearchApplicationRequestDescriptor(searchApplication, name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutSearchApplicationRequestDescriptor, PutSearchApplicationResponse, PutSearchApplicationRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual PutBehavioralAnalyticsResponse PutBehavioralAnalytics(PutBehavioralAnalyticsRequest request)
	{
		request.BeforeRequest();
		return DoRequest<PutBehavioralAnalyticsRequest, PutBehavioralAnalyticsResponse, PutBehavioralAnalyticsRequestParameters>(request);
	}

	/// <summary>
	/// <para>Creates a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutBehavioralAnalyticsResponse> PutBehavioralAnalyticsAsync(PutBehavioralAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutBehavioralAnalyticsRequest, PutBehavioralAnalyticsResponse, PutBehavioralAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Creates a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual PutBehavioralAnalyticsResponse PutBehavioralAnalytics(PutBehavioralAnalyticsRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<PutBehavioralAnalyticsRequestDescriptor, PutBehavioralAnalyticsResponse, PutBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Creates a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual PutBehavioralAnalyticsResponse PutBehavioralAnalytics(Elastic.Clients.Elasticsearch.Name name)
	{
		var descriptor = new PutBehavioralAnalyticsRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequest<PutBehavioralAnalyticsRequestDescriptor, PutBehavioralAnalyticsResponse, PutBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Creates a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual PutBehavioralAnalyticsResponse PutBehavioralAnalytics(Elastic.Clients.Elasticsearch.Name name, Action<PutBehavioralAnalyticsRequestDescriptor> configureRequest)
	{
		var descriptor = new PutBehavioralAnalyticsRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<PutBehavioralAnalyticsRequestDescriptor, PutBehavioralAnalyticsResponse, PutBehavioralAnalyticsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>Creates a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutBehavioralAnalyticsResponse> PutBehavioralAnalyticsAsync(PutBehavioralAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutBehavioralAnalyticsRequestDescriptor, PutBehavioralAnalyticsResponse, PutBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutBehavioralAnalyticsResponse> PutBehavioralAnalyticsAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutBehavioralAnalyticsRequestDescriptor(name);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutBehavioralAnalyticsRequestDescriptor, PutBehavioralAnalyticsResponse, PutBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates a behavioral analytics collection.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutBehavioralAnalyticsResponse> PutBehavioralAnalyticsAsync(Elastic.Clients.Elasticsearch.Name name, Action<PutBehavioralAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutBehavioralAnalyticsRequestDescriptor(name);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutBehavioralAnalyticsRequestDescriptor, PutBehavioralAnalyticsResponse, PutBehavioralAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Perform a search against a search application</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchApplicationSearchResponse<TDocument> Search<TDocument>(SearchApplicationSearchRequest request)
	{
		request.BeforeRequest();
		return DoRequest<SearchApplicationSearchRequest, SearchApplicationSearchResponse<TDocument>, SearchApplicationSearchRequestParameters>(request);
	}

	/// <summary>
	/// <para>Perform a search against a search application</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchApplicationSearchResponse<TDocument>> SearchAsync<TDocument>(SearchApplicationSearchRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<SearchApplicationSearchRequest, SearchApplicationSearchResponse<TDocument>, SearchApplicationSearchRequestParameters>(request, cancellationToken);
	}
}